<template>
	<view class="content" style="background-color: #f5f5f5;">
		<u-navbar scrollable=false titleStyle="font-size:40rpx;color:#333;" bgColor="#f5f5f5" :placeholder='true'
			title="聊天信息" :autoBack="true">
		</u-navbar>

		<view class="factory">
			<view class="top">
				<view class="logo">

				</view>
				<view class="name">
					<view class="fontS28 co3 fw6 linehight40"> 嘉瑞宝工厂</view>
					<view class="stars">
						<view class="star" style="padding-top: 10rpx;">
							<u-rate count="5" v-model="valueStar" :allowHalf='true' size='20rpx' :readonly='true'
								activeColor='#FFC047' inactiveColor='rgba(255, 168, 72, 0.2)'></u-rate>
						</view>
						<view class="score fontS24">
							3.7分
						</view>
						<view class="follow fontS24 co9">
							8.4万人关注
						</view>
					</view>
				</view>
				<view class="right">
					<!-- 返回图标 -->
					>
				</view>
			</view>
			<view class="bottom">
				<view class="box1">
					<view class="fontS24 co3 linehight34">工厂信息</view>
					<view class="fontS28 homeRed linehight40 fw5">此处工厂具体信息</view>
					<view class="co9 fontS20 linehight28">了解工厂 <text style="margin-left: 20rpx;">></text></view>
				</view>
				<view class="box2">
					<view class="palce fontS20" style="margin-right: 60rpx;">
						<view class="co3" style="line-height: 28rpx;">日本</view>
						<view class="co9" style="line-height: 28rpx; margin-top: 10rpx;">所在地</view>
					</view>
					<view class="date fontS20" style="margin-right: 60rpx;">
						<view class="co3" style="line-height: 28rpx;">2017年9月</view>
						<view class="co9" style="line-height: 28rpx;margin-top: 10rpx;">成立时间</view>
					</view>
					<view class="number fontS20">
						<view class="co3" style="line-height: 28rpx;">10台</view>
						<view class="co9" style="line-height: 28rpx;margin-top: 10rpx;">生产设备</view>
					</view>
				</view>
				<view class="box3">
					<view class="keyword fontS18" style="line-height: 26rpx;" v-for="(item,index) in keyword">
						{{item}}
					</view>
				</view>
			</view>
		</view>
		<view class="set">
			<view class="mes li">
				<view class="fontS24 co3 fw4" style="margin-top:8rpx">消息免打扰</view>
				<!-- 开关 -->
				<u-switch v-model="value" @change="change"></u-switch>
			</view>
			<view class="settop li">
				<view class="fontS24 co3 fw4" style="margin-top:8rpx">置顶聊天</view>
				<u-switch v-model="value2" @change="change"></u-switch>
				<!-- 开关 -->
			</view>
		</view>
		<button class="add fw5 homeRed ">添加到联系人</button>
		<button class="reduce fw5">清空聊天记录</button>
	</view>
</template>



<script>
	// import List from '@/componentes/list.vue'
	export default {
		data() {
			return {
				keyword: ["打样", "包工包料"],
				value: '',
				value2: '',
				count: 5,
				valueStar: 2
			}
		},
		components: {
			// List
		},
		methods: {
			change(e) {
				console.log('change', e);
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {

		// border: 2rpx solid #f5f5f5;
		.factory {
			width: 100%;
			padding: 24rpx 4%;
			box-sizing: border-box;
			background-color: white;

			.top {
				display: flex;
				justify-content: space-between;

				.logo {
					width: 80rpx;
					height: 80rpx;
					border-radius: 8rpx;
					background-color: aliceblue;
					margin-right: 20rpx;
				}

				.name {
					// background-color: red;
					flex-grow: 1;

					.linehight40 {
						line-height: 40rpx;
					}

					.stars {
						display: flex;

						.score {
							color: #ffa848;
							margin-left: 8rpx;
						}

						.follow {
							margin-left: 32rpx;
						}
					}

				}

				.right {
					line-height: 80rpx;
				}
			}

			.bottom {
				.box1 {
					margin-top: 24rpx;
					margin-bottom: 12rpx;
					display: flex;
					justify-content: space-between;
				}

				.box2 {
					display: flex;
					justify-content: space-between;
				}

				.box3 {
					display: flex;
					margin-top: 20rpx;

					.keyword {
						margin-right: 16rpx;
						border: 2rpx solid $red;
						padding: 2rpx 6rpx;
						color: $red;
						border-radius: 26rpx;
					}
				}
			}
		}

		.set {
			margin-top: 24rpx;
			padding: 0 4%;
			background-color: white;

			>.li {
				padding: 24rpx 0;
				display: flex;
				justify-content: space-between;

				&:first-child {
					border-bottom: 2rpx solid #ededed;
				}
			}
		}


		.add {
			width: 80%;
			height: 80rpx;
			background-color: $red;
			color: white;
			line-height: 80rpx;
			border-radius: 40rpx;
			margin-top: 32rpx;
			margin-bottom: 40rpx;

		}

		.reduce {
			width: 80%;
			height: 80rpx;
			background-color: #ccc;
			color: white;
			line-height: 80rpx;
			border-radius: 40rpx;
		}
	}
</style>
